package com.example.concurrent;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.TimeUnit;

/**
 * @author houyangfan
 * @version 1.0
 * @date 2022/7/14 16:22
 */
@RestController
@RequestMapping("/feignandribbon")
public class FeignServer {

    /**
     * feign 和 ribbon的配合使用
     */

    @PostMapping("server")
    public void server() throws InterruptedException {
        TimeUnit.MINUTES.sleep(10);
        System.out.println("feign调用服务端执行");
    }
}
